import createAxios from '/@/utils/axios'


export const controllerUrl = '/system/business.Information/'

// 获取商品编码
export function getHscodeApi(params: anyObj){
    return createAxios({
        url: controllerUrl + 'getHscode',
        method: 'get',
        params
    },{
        showSuccessMessage: false
    })
}

// 生成发票号
export function generatePiNumApi(params: anyObj){
    return createAxios({
        url: controllerUrl + 'generatePiNum',
        method: 'get',
        params
    },{
        showSuccessMessage: false
    })
}

export function ckGeneratePiApi(params: anyObj){
    return createAxios({
        url: '/system/customer.Order/ckGeneratePi',
        method: 'get',
        params
    },{
        showSuccessMessage: false
    })
}
export function ckGenerateHtApi(params: anyObj){
    return createAxios({
        url: '/system/customer.Order/ckGenerateHt',
        method: 'get',
        params
    },{
        showSuccessMessage: false
    })
}


// 保存文件
export function saveFileApi(data: anyObj){
    return createAxios({
        url: controllerUrl + 'saveFile',
        method: 'post',
        data: data
    },{
        showSuccessMessage: true
    })
}

export function saveInformationApi(data: anyObj){
    return createAxios({
        url: controllerUrl + 'saveInformation',
        method: 'post',
        data: data
    },{
        showSuccessMessage: true
    })
}

export function saveInformationGoodsApi(data: anyObj){
    return createAxios({
        url: controllerUrl + 'saveInformationGoods',
        method: 'post',
        data: data
    },{
        showSuccessMessage: true
    })
}

export function updateInformationGoodsApi(data: anyObj){
    return createAxios({
        url: controllerUrl + 'updateInformationGoods',
        method: 'post',
        data: data
    },{
        showSuccessMessage: true
    })
}


export function getHscodeSkuApi(params: anyObj){
    return createAxios({
        url: controllerUrl + 'getHscodeSku',
        method: 'get',
        params
    },{
        showSuccessMessage: false
    })
}

export function delFileApi(params: anyObj){
    return createAxios({
        url: controllerUrl + 'delFile',
        method: 'get',
        params
    },{
        showSuccessMessage: false
    })
}

export function downloadFileApi(params: anyObj){
    return createAxios({
        url: controllerUrl + 'downloadFile',
        method: 'get',
        params
    },{
        showSuccessMessage: false
    })
}

export function getGoodsHscodeApi(params: anyObj){
    return createAxios({
        url: controllerUrl + 'getGoodsHscode',
        method: 'get',
        params
    },{
        showSuccessMessage: false
    })
}


// 生成发票号
export function getInformationGoodsApi(params: anyObj){
    return createAxios({
        url: controllerUrl + 'getInformationGoods',
        method: 'get',
        params
    },{
        showSuccessMessage: false
    })
}
export function delGoodsApi(params: anyObj){
    return createAxios({
        url: controllerUrl + 'delGoods',
        method: 'get',
        params
    },{
        showSuccessMessage: true
    })
}

export function getFileApi(data: anyObj){
    return createAxios({
        url: controllerUrl + 'getFile',
        method: 'post',
        data: data
    },{
        showSuccessMessage: false
    })
}